<template>
    <el-form :model="productItem" label-width="80px">

        <el-form-item label="商品分类">
            <el-input  v-model="productItem!.classifies" 
            :options="classifyData" 
            :props="{
                multiple: true,
                checkStrictly: true,
                label: 'name',
                value: '_id'
            }" clearable />

        </el-form-item>

        <el-form-item label="商品名称">
            <el-input v-model="productItem!.name"></el-input>
        </el-form-item>

    </el-form>
</template>

<script setup lang="ts">
 import {productitem } from '@/api/modules/products';
import { useFetchData } from '@/hooks/fetchData';
// import { options } from 'node_modules/axios/index.d.cts';
import { onMounted } from 'vue';
let productItem = defineModel<productitem>()
let { getClassifyDataAsync, classifyData } = useFetchData()


onMounted(() => {
    getClassifyDataAsync()
})




</script>

<style scoped></style>